package com.java.basis.string;

import java.util.Arrays;

/**
 * @author wangning
 * @create 2021-08-12 15:11
 */
public class TestStringSubString01 {
	public static void main(String[] args) {
		String name = "test.txt";
		System.out.println(name.lastIndexOf("."));
		System.out.println(name.substring(name.lastIndexOf(".") + 1));

		System.out.println(Arrays.toString(name.split("\\.")));
		System.out.println(name.split("\\.")[name.split("\\.").length-1]);

		final char[] chars = name.toCharArray();
		System.out.println("charts" + Arrays.toString(chars));
	}
}
